<table>
    <tbody>
        <tr>
            <td width="100px"><?php echo $form->label('Product.part_no', 'Part no.'); ?></td>
            <td><?php echo $form->text('Product.part_no'); ?></td>
            <td width="130px"><?php echo $form->label('Product.supplier_part_no', 'Vendor Part no.'); ?></td>
            <td><?php echo $form->text('Product.supplier_part_no'); ?></td>
        </tr>
        <tr>
            <td><?php echo $form->label('Product.supplier_id', 'Vendor'); ?></td>
            <td><?php echo $form->select('Product.supplier_id', $suppliers, null, array('style' => 'width: 280px')); ?></td>
            <td><?php echo $form->label('Product.type_id', 'Type'); ?></td>
            <td><?php echo $form->select('Product.type_id', $types); ?></td>
        </tr>
        <tr>
            <td><?php echo $form->label('Product.brand_id', 'Brand'); ?></td>
            <td><?php echo $form->select('Product.brand_id', $brands); ?></td>
            <td><?php echo $form->label('Product.model'); ?></td>
            <td><?php echo $form->text('Product.model'); ?></td>
        </tr>
        <tr>
            <td><?php echo $form->label('Product.category_id', 'Category'); ?></td>
            <td colspan="3"><?php echo $form->select('Product.category_id', $categories, null); ?></td>
        </tr>
        <tr>
            <td><?php echo $form->label('Product.title'); ?></td>
            <td colspan="3"><?php echo $form->text('Product.title', array('size' => 50)); ?></td>
        </tr>
        <tr>
            <td class="top"><?php echo $form->label('Product.text', 'Description'); ?></td>
            <td colspan="3"><?php echo $form->textarea('Product.text', array('cols' => 50)); ?></td>
        </tr>
        <tr>
            <td class="top"><?php echo $form->label('Product.current_stock', 'Current Stock'); ?></td>
            <td>
                <?php echo $form->select('current_stock_operand', $operands, '>'); ?>
                <?php echo $form->text('Product.current_stock', array('size' => 5, 'class' => 'text-right')); ?>
            </td>
        </tr>
        <tr>
            <td class="top"><?php echo $form->label('Product.cost', 'Latest Cost'); ?></td>
            <td>
                From <?php echo $form->text('Product.cost_start', array('size' => 5, 'class' => 'text-right')); ?>
                To <?php echo $form->text('Product.cost_end', array('size' => 5, 'class' => 'text-right')); ?> Baht
            </td>
            <td class="top"><?php echo $form->label('Product.last_stock_in_date', 'Last Stock in Date'); ?></td>
            <td>
                From <?php echo $form->text('Product.last_stock_in_date_start', array('size' => 7, 'class' => 'text-right')); ?>
                To <?php echo $form->text('Product.last_stock_in_date_end', array('size' => 7, 'class' => 'text-right')); ?>
            </td>
        </tr>
        <tr>
            <td class="top"><?php echo $form->label('Product.price', 'Latest Price'); ?></td>
            <td>
                From <?php echo $form->text('Product.price_start', array('size' => 5, 'class' => 'text-right')); ?>
                To <?php echo $form->text('Product.price_end', array('size' => 5, 'class' => 'text-right')); ?> Baht
            </td>
            <td class="top"><?php echo $form->label('Product.last_dispatch_date', 'Last Dispatch Date'); ?></td>
            <td>
                From <?php echo $form->text('Product.last_dispatch_date_start', array('size' => 7, 'class' => 'text-right')); ?>
                To <?php echo $form->text('Product.last_dispatch_date_end', array('size' => 7, 'class' => 'text-right')); ?>
            </td>
        </tr>
        <tr>
            <td class="top"><?php echo $form->label('CustProductSite.customer_id', 'Customer'); ?></td>
            <td><?php echo $form->select('CustProductSite.customer_id', $customers); ?></td>
        </tr>
        <tr>
            <td class="top"><?php echo $form->label('CustProductSite.site_id', 'Site'); ?></td>
            <td><?php echo $form->select('CustProductSite.site_id'); ?></td>
        </tr>
    </tbody>
</table>
<script type="text/javascript">
    $j(function() {
        $j.betweensearchpicker("#ProductCost");
        $j.betweensearchpicker("#ProductPrice");
        $j.datesearchpicker("#ProductLastStockInDate");
        $j.datesearchpicker("#ProductLastDispatchDate");
        $j("#CustProductSiteCustomerId").bind('change', function() {
            requestOptions("sites", "CustProductSiteCustomerId", "CustProductSiteSiteId");
        });
    })
</script>